package cn.gene.timeyan.ams.webapi.controller;

import cn.gene.timeyan.ams.service.IMapService;
import cn.gene.timeyan.common.restful.JsonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

@RestController
@Api("地图功能模块")
public class MapController {
    @Autowired
    private IMapService mapService;

    @GetMapping("/get_addr")
    @ApiOperation("依据ip获得地址")
    public JsonResult<Map> getAddressByUserIP(HttpServletRequest request){
        Map result=mapService.getAddressByUserIP(request);
        return JsonResult.ok(result);
    }
}
